import request from '@/utils/request'

// 添加融资配置
export function addFinancingConfig(data) {
  return request({
    url: '/financing/config/add',
    method: 'POST',
    data,
  })
}
// 融资配置列表
export function financingConfigList(params) {
  return request({
    url: '/financing/config/list',
    method: 'GET',
    params,
  })
}
// 融资配置详情
export function financingConfigDetail(id) {
  return request({
    url: `/financing/config/get/${id}`,
    method: 'GET',
  })
}
// 编辑融资配置
export function editFinancingConfig(data) {
  return request({
    url: `/financing/config/edit`,
    method: 'PUT',
    data,
  })
}
// 删除融资配置
export function delFinancingConfig(id) {
  return request({
    url: `/financing/config/delete/${id}`,
    method: 'DELETE',
  })
}

// 添加增信配置
export function addCreditConfig(data) {
  return request({
    url: '/credit/config/add',
    method: 'POST',
    data,
  })
}
// 增信配置列表
export function creditConfigList(params) {
  return request({
    url: '/credit/config/list',
    method: 'GET',
    params,
  })
}
// 增信配置详情
export function creditConfigDetail(id) {
  return request({
    url: `/credit/config/get/${id}`,
    method: 'GET',
  })
}
// 编辑增信配置
export function editCreditConfig(data) {
  return request({
    url: `/credit/config/edit`,
    method: 'PUT',
    data,
  })
}
// 删除增信配置
export function delCreditConfig(id) {
  return request({
    url: `/credit/config/delete/${id}`,
    method: 'DELETE',
  })
}
